<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <title>添加系统用户</title>
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="stylesheet" href="../../../component/elementUI/index.css">
    <link rel="stylesheet" href="../../../style/wangeditor.css">
    <link rel="stylesheet" href="../../../style/index.css">
    <style>
        .el-descriptions-item__label {
            width: 100px;
        }
    </style>
</head>

<body>
    <div id="app" v-cloak>
        <yl-page-header content="添加收货单"></yl-page-header>
        <el-form :model="form" :rules="rules" ref="contract" inline-message="true" style="width: 100%">
            <div class="table_titel">
                <div class="titel">收货单</div>
            </div>
            <el-descriptions :column="1" border size="small">
                <el-descriptions-item label="身份证上传">
                    <el-form-item prop="ID_Front">
                        <yl-upload unslider base64 v-model.trim="form.ID_Front" @remove="()=>{this.form.ID_Number='';this.form.ID_Name=''}"></yl-upload>
                    </el-form-item>
                </el-descriptions-item>
                <el-descriptions-item label="身份证号">
                    <el-form-item prop="ID_Number">
                        <el-input v-model.trim="form.ID_Number" placeholder="请输入身份证号">
                            <i v-if="iconLoading" slot="prefix" class="el-input__icon el-icon-loading"></i>
                        </el-input>
                    </el-form-item>
                </el-descriptions-item>
                <el-descriptions-item label="姓名">
                    <el-form-item prop="ID_Name">
                        <el-input v-model.trim="form.ID_Name" placeholder="请输入姓名">
                            <i v-if="iconLoading" slot="prefix" class="el-input__icon el-icon-loading"></i>
                        </el-input>
                    </el-form-item>
                </el-descriptions-item>
                <el-descriptions-item label="收货时间">
                    <el-form-item prop="ID_Front">
                        <el-date-picker v-model.trim="form.Acquisition_Date" type="datetime" placeholder="请选择收购时间" value-format="yyyy-MM-dd HH:mm:ss"></el-date-picker>
                    </el-form-item>
                </el-descriptions-item>
            </el-descriptions>
            <div class="table_titel">
                <div class="titel">收货明细</div>
                <div class="operation">
                    <el-button type="primary" size="small" @click="add_business_traceability_acquisition_order_detail">添加</el-button>
                    <el-button type="danger" size="small" @click="remove_business_traceability_acquisition_order_detail">删除</el-button>
                </div>
            </div>
            <el-descriptions style="margin-bottom: 5px;" v-for="(item,index) in form.Children.business_traceability_acquisition_order_detail" :key="index" :column="2" border size="small">
                <!-- <el-descriptions-item label="村民">
                    <el-form-item prop="Land_Certificate">
                        <el-select clearable v-model.trim="item.ID_Number" placeholder="请选择被收购村民" filterable style="width: 100%">
                            <el-option v-for="(item,index) in farmer" :key="index" :label="item.ID_Name" :value="item.ID_Number"></el-option>
                        </el-select>
                    </el-form-item>
                </el-descriptions-item> -->
                <el-descriptions-item label="收购类型">
                    <el-form-item prop="Land_Certificate">
                        <el-select clearable v-model.trim="item.Category_SerialNumber" placeholder="请选择收购商品类型" filterable style="width: 100%">
                            <el-option v-for="(item,index) in category" :key="index" :label="item.Category_Name" :value="item.Category_SerialNumber"></el-option>
                        </el-select>
                    </el-form-item>
                </el-descriptions-item>
                <el-descriptions-item label="收购商品">
                    <el-form-item prop="Article_SerialNumber">
                        <el-select clearable @change="change($event,item)" v-model.trim="item.Article_SerialNumber" placeholder="请选择商品" filterable style="width: 100%">
                            <el-option v-for="(item,index) in article" :key="index" :label="item.Article_Name" :value="item.Article_SerialNumber"></el-option>
                        </el-select>
                    </el-form-item>
                </el-descriptions-item>
                <el-descriptions-item label="规格">
                    <el-form-item prop="Article_SerialNumber">
                        <el-select clearable :disabled="!item.Article_SerialNumber" v-model.trim="item.Article_Specifications_SerialNumber" placeholder="请选择商品规格" filterable style="width: 100%">
                            <el-option v-for="(item,index) in item.specifications" :key="index" :label="item.Specifications_Name" :value="item.Article_Specifications_SerialNumber"></el-option>
                        </el-select>
                    </el-form-item>
                </el-descriptions-item>
                <el-descriptions-item label="收购数量">
                    <el-form-item prop="Quantity">
                        <el-input v-model.trim="item.Quantity" placeholder="请输入收购数量"></el-input>
                    </el-form-item>
                </el-descriptions-item>
                <el-descriptions-item label="单位">
                    <el-form-item prop="Quantity">
                        <el-select clearable v-model.trim="item.Article_Unit_SerialNumber" placeholder="请选择单位" filterable style="width: 100%">
                            <el-option v-for="(item,index) in unit" :key="index" :label="item.Unit" :value="item.Article_Unit_SerialNumber"></el-option>
                        </el-select>
                    </el-form-item>
                </el-descriptions-item>
                <el-descriptions-item label="单价">
                    <el-form-item prop="Unit_Price">
                        <el-input v-model.trim="item.Unit_Price" placeholder="请输入单价"></el-input>
                    </el-form-item>
                </el-descriptions-item>
                <el-descriptions-item label="收购方式">
                    <el-form-item prop="">
                        <el-select clearable v-model.trim="item.Acquisition_Type" placeholder="请选择收购方式" filterable style="width: 100%">
                            <el-option v-for="(item,index) in type" :key="index" :label="item.label" :value="item.value"></el-option>
                        </el-select>
                    </el-form-item>
                </el-descriptions-item>
                <el-descriptions-item label="车牌号">
                    <el-form-item prop="Plate_Number">
                        <el-input v-model.trim="item.Plate_Number" placeholder="请输入车牌号"></el-input>
                    </el-form-item>
                </el-descriptions-item>
                <el-descriptions-item label="收购仓库">
                    <el-form-item prop="Warehouse_SerialNumber">
                        <el-select clearable v-model.trim="item.Warehouse_SerialNumber" placeholder="请选择收购仓库" filterable style="width: 100%">
                            <el-option v-for="(item,index) in warehouse" :key="index" :label="item.Warehouse_Name" :value="item.Warehouse_SerialNumber"></el-option>
                        </el-select>
                    </el-form-item>
                </el-descriptions-item>
            </el-descriptions>
            <div style="height: 90px;"></div>
            <el-form-item class="form-operation">
                <el-button @click="window.history.back()">返回</el-button>
                <el-button type="primary" :loading="loading" @click="submitForm('contract')">提交</el-button>
            </el-form-item>
        </el-form>
    </div>
    <script type="text/javascript" src="../../../utils/wangeditor.js"></script>
    <script type="text/javascript" src="../../../utils/jquery.min.js"></script>
    <script type="text/javascript" src="../../../utils/jquery.cookie.js"></script>
    <script type="text/javascript" src="../../../utils/vue.min.js"></script>
    <script type="text/javascript" src="../../../utils/vuex.min.js"></script>
    <script type="text/javascript" src="../../../component/elementUI/index.js"></script>
    <script type="text/javascript" src="../../../component/component.js"></script>
    <script type="text/javascript" src="../../../config/config.js"></script>
    <script type="text/javascript" src="../../../utils/compressor.js"></script>
    <script type="text/javascript" src="../../../utils/ID_Validity.js"></script>
    <script type="text/javascript" src="../../../utils/utils.js"></script>
    <script type="text/javascript" src="js/add.js"></script>
</body>

</html>